package utils;

import java.awt.*;
import javax.swing.*;

public class WindowUtilities 
{

    public static void centerFrame(JFrame f) 
    {
	Toolkit tk = Toolkit.getDefaultToolkit ();
	
	Dimension screen = tk.getScreenSize ();

	int lx =  (int)((screen.getWidth () - f.getWidth())/2);
	int ly =  (int)((screen.getHeight () - f.getHeight())/2);
	f.setLocation (lx,ly);
    } 
    
}